package indzcraft.loader;
//import java.util.Arrays;
import java.util.HashMap;

public class GlyphDB {
	
	private HashMap<Integer,Glyph> glyphDB = new HashMap<Integer,Glyph>();
	//int[] ignorelist = new int[]{69210,46874,77950,65905,73526};
	
	public GlyphDB(){
		//Arrays.sort(ignorelist);
		populateDB();
	}
	
	public GlyphDB.Glyph getGlyph(int id){
		if(glyphDB.containsKey(id)){
			return glyphDB.get(id);
		}
		//if(!(Arrays.binarySearch(ignorelist, id) >= 0))
			System.out.println("unknown glyphid:"+  id);
		return null;
	}
	
	private void populateDB() {
		glyphDB.put(404, new Glyph("hemorrhage","prime"));
		glyphDB.put(393, new Glyph("backstab","prime"));
		glyphDB.put(410, new Glyph("slice_and_dice","prime"));
		glyphDB.put(400, new Glyph("feint","major"));
		glyphDB.put(405, new Glyph("preparation","major")); 
		glyphDB.put(732, new Glyph("tricks_of_the_trade","major")); 
		glyphDB.put(409, new Glyph("sinister_strike","prime"));
		glyphDB.put(391, new Glyph("adrenaline_rush","prime"));
		glyphDB.put(394, new Glyph("blade_flurry","major"));
		glyphDB.put(731, new Glyph("fan_of_knives","major"));
		glyphDB.put(716, new Glyph("shadow_dance","prime"));
		glyphDB.put(411, new Glyph("sprint","major"));
		glyphDB.put(926, new Glyph("kick","major"));
		glyphDB.put(398, new Glyph("eviscerate","prime"));
		glyphDB.put(401, new Glyph("garrote","major"));
		glyphDB.put(929, new Glyph("blind","major"));
		
		glyphDB.put(733, new Glyph("unknown","prime"));
		glyphDB.put(406, new Glyph("unknown2","prime"));
	}
	
	public HashMap<Integer, Glyph> getAll(){
		return this.glyphDB;
	}

	public class Glyph{
		private String name = "";
		private String type = "";
		
		public Glyph(String n,String t){
			name = n;
			setType(t);
		}
		public void setName(String name) {
			this.name = name;
		}
		public String getName() {
			return name;
		}
		public void setType(String type) {
			this.type = type;
		}
		public String getType() {
			return type;
		}
	}
}

